@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="costPurchaseForm">
            <input type="hidden" id="id" value="">
            <div class="row">
                <div class="col-sm-6 b-r">
                    <#select id="location" name="地区" underline="true" required="true">
                    <option value='1'>重庆</option>
                    <option value='2'>北京</option>
                </#select>
                <div class="form-group required">
                    <label class="col-sm-3 control-label">项目名称</label>
                    <div class="col-sm-9">
                        <select class='form-control selectpicker' data-live-search="true" id='projectid' name='projectid'>
                        </select>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <#input id="receivingunit" name="收款单位(员工姓名)" required="true" underline="true"/>
                <#input id="account" name="账号" underline="true" required="true"/>
                <div class="form-group required">
                    <label class="col-sm-3 control-label">申请日期</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="applytime" name="applytime">
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group required">
                    <label class="col-sm-3 control-label">审批人</label>
                    <div class="col-sm-9">
                        <select class='form-control selectpicker' data-live-search="true" id='assignee' name='assignee'>
                        </select>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
            </div>
            <div class="col-sm-6">
                <#input name="部门" id="departs" readonly="readonly" hidden="deptid"
                clickFun="CostPurchaseApplyInfoDlg.showDeptSelectTree(); return false;"
                style="background-color: #ffffff !important;" underline="true" required="true"/>
                <#input id="code" name="项目编号" readonly="readonly" underline="true"/>
                <#input id="bank" name="开户行" required="true" underline="true"/>
                <#input id="use" name="用途" underline="true" required="true"/>
                <#input id="countfee" name="采购总价(元)" underline="true" readonly="readonly"/>
            </div>
        </div>
        <div class="col-sm-12">
            <table class="table table-bordered" id="confirm_table">
                <caption align="top">采购商品确认报价</caption>
                <tr>
                    <th style="text-align:center">商品名称</th>
                    <th style="text-align:center">规格型号</th>
                    <th style="text-align:center">数量</th>
                    <th style="text-align:center">预计单价(元)</th>
                    <th style="text-align:center">预计总价(元)</th>
                    <th style="text-align:center">供应商</th>
                    <th style="text-align:center">备注</th>
                    <th style="text-align:center">操作</th>
                </tr>
                <tr class="confirmContent" id="0">
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="goods" name="goods0"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="type" name="type0"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="num" name="num0" onblur="CostPurchaseApplyInfoDlg.countTotal(this);return false;"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="price" name="price0" onblur="CostPurchaseApplyInfoDlg.countTotal(this);return false;"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="totalfee" name="totalfee0" readonly="readonly"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="supplier" name="supplier0"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="note" name="note0"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <#button type="button" icon="fa-minus" name="删除" clickFun="CostPurchaseApplyInfoDlg.deleteConfirmRow(this, 'add', 0)"/>
                    </td>
                </tr>
            </table>
            <div id="addtrconifrmdiv" style="margin-top:-15px; width: 15%; float: right;">
                <#button btnCss="primary" icon="fa-plus" name="添加" clickFun="CostPurchaseApplyInfoDlg.addConfirmRow()"/>
            </div>
        </div>
        <div class="col-sm-12">
            <table class="table table-bordered" id="inquiry_table" style="display: none">
                <caption align="top">采购商品询价</caption>
                <tr>
                    <th style="text-align:center">商品名称</th>
                    <th style="text-align:center">规格型号</th>
                    <th style="text-align:center">数量</th>
                    <th style="text-align:center">预计单价(元)</th>
                    <th style="text-align:center">预计总价(元)</th>
                    <th style="text-align:center">报价单位</th>
                    <th style="text-align:center">备注</th>
                    <th style="text-align:center">操作</th>
                </tr>
                <tr class="inquiryContent" id="0">
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="goods" name="inquiry_goods0"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="type" name="inquiry_type0"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="num" name="inquiry_num0" onblur="CostPurchaseApplyInfoDlg.countInquiryTotal(this);return false;"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="price" name="inquiry_price0" onblur="CostPurchaseApplyInfoDlg.countInquiryTotal(this);return false;"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="totalfee" name="inquiry_totalfee0" readonly="readonly"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="quotationunit" name="inquiry_quotationunit0"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <input class="form-control" type="text" id="note" name="inquiry_note0"/>
                            </div>
                        </div>
                    </td>
                    <td class="col-md-6">
                        <#button type="button" icon="fa-minus" name="删除" clickFun="CostPurchaseApplyInfoDlg.deleteInquiryRow(this, 'add', 0)"/>
                    </td>
                </tr>
            </table>
            <div id="addtrinquirydiv" style="margin-top:-15px; width: 15%; float: right; display: none">
                <#button btnCss="primary" icon="fa-plus" name="添加" clickFun="CostPurchaseApplyInfoDlg.addInquiryRow()"/>
            </div>
        </div>
        <div class="col-sm-6 b-r">
            <div id="showInquiry" style="margin-top:-15px; width: 15%; float: right; display: block">
                <#button btnCss="primary" icon="fa-plus" name="添加采购商品询价" clickFun="CostPurchaseApplyInfoDlg.showInquiryTable()"/>
            </div>
            <div id="hiddenInquiry" style="margin-top:-15px; width: 15%; float: right; display: none">
                <#button btnCss="primary" icon="fa-minus" name="删除采购商品询价" clickFun="CostPurchaseApplyInfoDlg.hiddenInquiryTable()"/>
            </div>
        </div>
        <!-- 这是部门选择的下拉框 -->
        <div id="menuContent" class="menuContent"
             style="display: none; position: absolute; z-index: 200;">
            <ul id="treeDemo" class="ztree tree-box" style="width: 249px !important;"></ul>
        </div>
        <div class="row btn-group-m-t">
            <div class="col-sm-10">
                <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="CostPurchaseApplyInfoDlg.saveSubmit()"/>
                <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CostPurchaseApplyInfoDlg.addSubmit()"/>
                <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CostPurchaseApplyInfoDlg.goBack()"/>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/biz/apply/cost/purchase/costPurchaseApply_info.js"></script>
<script>
    laydate.render({
        elem: '#applytime'
    });
</script>
@}
